package com.findyou.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.findyou.pojo.Headline;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.findyou.pojo.vo.PortalVo;
import org.apache.ibatis.annotations.Param;

import java.lang.management.OperatingSystemMXBean;
import java.util.Map;

/**
* @author Lenovo
* @description 针对表【news_headline】的数据库操作Mapper
* @createDate 2024-03-06 20:06:45
* @Entity com.findyou.pojo.Headline
*/
public interface HeadlineMapper extends BaseMapper<Headline> {

    /**
     *  MyBatis-Plus 分页查询的方法。
     *  IPage 是 MyBatis-Plus 提供的分页结果接口，
     *  用于返回查询结果和分页信息。
     * @param iPage
     * @param portalVo
     * @return
     */
    IPage<Map> findNewsPage(IPage iPage, @Param("portalVo") PortalVo portalVo);

    Map showHeadlineDetail(int hid);

    void updateByMyId(@Param("pageViews") int x, @Param("hid") int hid);


    void publish(Headline headline);

    Headline findHeadlineByHid(int hid);

    Headline selectByMyId(Integer hid);

    void MyupdateById(Headline headline);

    void Mydelete(int hid);
}




